public class ThrowDemo {
    public static void main(String[] args) {
        Student stu=new Student();
        try{
            stu.setAge(1000);
        }catch (RuntimeException e){
            System.out.println("年龄不合法");
        }
        System.out.println("OK");
    }
}
